// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import App from './App'
import router from './router'

Vue.config.productionTip = false
Vue.use(ElementUI)

// 引入请求接口列表
import api from './api/api'
Vue.prototype.api = api

// 引入axios请求方式并设置原型属性名为ajax
import axios from './utils/axios'
Vue.prototype.axios = axios

// 引入本地存储组件并设置原型属性名为storage
import vStorage from './utils/vStorage.js'
vStorage.setPrefix('qz_') // key的前缀
vStorage.setStoregeType('localStorage') // 默认存储方式
Vue.prototype.storage = vStorage

// 引入通用脚本并设置原型属性名为$
import commonJs from './utils/common.js'
Vue.prototype.$ = commonJs

// 引入公共样式文件
require('./style/style.scss')

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
